<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <title>疯狂的旅行家-创意旅行征集令</title>
    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport">
    <meta name="description" content="" />
    <meta name="keywords" content="" />
    <link rel="stylesheet" href="src/css/m.min.css">
    <style>
        html {
            background-color: #ff8001;
        }
    </style>
    <script>
        (function(){
            var phoneWidth =  parseInt(window.screen.width);
            var phoneScale = phoneWidth/640;
            var isAndroid = RegExp("Android").test(navigator.userAgent);
            if (isAndroid) {
                document.write('<meta name="viewport" content="width=640, minimum-scale = '+phoneScale+', maximum-scale = '+phoneScale+', target-densitydpi=device-dpi">');
            } else {
                document.write('<meta name="viewport" content="width=640, user-scalable=no, target-densitydpi=device-dpi">');
            }
        }());
    </script>
</head>

<body class="app">

    <div class="container orange">

        <div class="page-two-box">
            <a href="index.html" class="back-btn"></a>
            <a href="javascript:void(0)" class="share-btn"></a>
            <i class="icon-circle"></i>
            <i class="icon-line"></i>
            <section id="js-place-list" class="search-filter">
                <a href="javascript:void(0)" class="icon-america" data-value="美洲"></a>
                <a href="javascript:void(0)" class="icon-europe" data-value="欧洲"></a>
                <a href="javascript:void(0)" class="icon-asia cur" data-value="亚洲"></a>
                <a href="javascript:void(0)" class="icon-africa" data-value="非洲"></a>
                <a href="javascript:void(0)" class="icon-oceania" data-value="大洋洲"></a>
            </section>
            <section class="result-box result-box2">
                <ul id="js-list" class="result-list"></ul>
            </section>
        </div>

    </div>

    <div class="wechat-overlay" style="display:none;">
        <div class="wechat-dialog"></div>
    </div>

    <script id="renderTemplate" type="text/x-handlebars-template">
        {{#each groupList}}
        <li>
            <a href="http://www.one-dao.com/html/yidaozou/yapp/groupinfo.html?{{getParams _id}}" class="item-content">
                {{#if tags}}
                <div class="icon-tag"><span>{{tags}}}</span></div>
                {{/if}}
                {{#if users.0.img}}
                <div class="avatar-wrapper">
                    <img width="94" height="94" src="" data-src="{{users.0.img}}" alt=""/>
                </div>
                {{/if}}
                <div class="img-wrapper">
                    <div class="img-info">
                        <p class="theme"><span class="tit">{{title}}</span><span class="status">{{trip_status}}</span></p>
                        <ul class="detail-list clearfix">
                            <li>{{plan_info.destinations}}</li>
                            <li>06.07</li>
                            <li>团费￥628</li>
                        </ul>
                    </div>
                    <img width="100%" height="324" src="" data-src="{{img}}" alt=""/>
                </div>
                <div class="text-wrapper">
                    {{#if intro}}
                    <p>{{intro}}</p>
                    {{else}}
                    <p>没有介绍信息</p>
                    {{/if}}
                </div>
            </a>
        </li>
        {{/each}}
    </script>

    <script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
    <script src="src/js/zepto.min.js"></script>
    <script src="src/js/handlebars.js"></script>
    <script src="src/js/initWX.js"></script>
    <script src="src/js/base.js"></script>
    <script>
        Zepto(function($){

            CT.app.initPlacePage();
            var isWeixin = function () {
                var ua = navigator.userAgent.toLowerCase();
                if (ua.match(/MicroMessenger/i) == 'micromessenger') {
                    return true;
                } else {
                    return false;
                }
            };
            var u = navigator.userAgent;
            var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Linux') > -1;
            var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);
            var iconURL = encodeURIComponent('http://img.one-dao.com/image/h5/crazytraveler.png');
            var detailURL = encodeURIComponent('http://www.one-dao.com/html/crazytraveler/2.html');
            var title = encodeURIComponent('一道走疯狂旅行家，赢5万元旅游基金！');
            var description = encodeURIComponent('现在创建主题行程，赢5万元旅游基金！一道走带你体验最深度的旅行方式，疯狂玩转五大洲！');
            $('.wechat-overlay').click(function() {
                $(this).hide();
            });
            $('.share-btn').click(function() {
                if(isWeixin()) {
                    $('.wechat-overlay').show();
                } else {
                    if (isAndroid && window.YiDaoZou) {
                        YiDaoZou.shareOpenMenu(iconURL, detailURL, title, description);
                    } else if(isiOS) {
                        document.location = 'share_openMenu://?iconURL=' + iconURL + '&detailURL=' + detailURL + '&title=' + title + '&description=' + description;
                    }
                }
            });
        })
    </script>

</body>

</html>
